package cn.initcap.designpattern.pattern.behavioral.chainofresponsibility;

import org.apache.commons.lang3.StringUtils;

/**
 * @author initcap
 * @date Created in 2018/11/1 PM10:34.
 */
public class ArticleBaseApprover extends BaseApprover {
    @Override
    public void deploy(Course course) {
        if (StringUtils.isNotEmpty(course.getArticle())) {
            System.out.println(course.getName() + "含有手记，批准");
            if (baseApprover != null) {
                baseApprover.deploy(course);
            }
        } else {
            System.out.println(course.getName() + "不包含手记，不批准");
            return;
        }
    }
}
